]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: use g_file_replace() when using an absolute path
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 3 Jan 2013 14:02:00 +0000 (15:02 +0100)
committerCosimo Cecchi <cosimoc@gnome.org>
Thu, 3 Jan 2013 14:02:00 +0000 (15:02 +0100)
Instead of g_file_create(), which always fails if the file exists
already.

src/shell-screenshot.c

index 4078ccd5612263c6080e1002a7091ff6ae67aee5..2914e07054cb1e9c11eb6c070437c036ba6a00ca 100644 (file)
@@ -153,7 +153,7 @@ prepare_write_stream (const gchar *filename,
     {
       file = g_file_new_for_path (filename);
       *filename_used = g_strdup (filename);
-      stream = G_OUTPUT_STREAM (g_file_create (file, G_FILE_CREATE_NONE, NULL, NULL));
+      stream = G_OUTPUT_STREAM (g_file_replace (file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL));
       g_object_unref (file);
     }
   else